﻿@model Orion.Models.Question

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@{ Html.EnableClientValidation(); }

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Svara fyrirspurn: @Model.Title</legend>

        <div class="editor-label">
            @Html.HiddenFor(model => model.ID)
        </div>
        @Html.HiddenFor(model => model.Recipient)
        @Html.HiddenFor(model => model.RecipientId)

        <div class="editor-label">
            @Html.LabelFor(model => model.Title, "Titill")
        </div>
        <div class="editor-field">
            @Html.DisplayTextFor(model => model.Title).ToString()
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Question1, "Spurning")
        </div>
        <div class="editor-field">
            @Html.DisplayTextFor(model => model.Question1).ToString()
            @Html.ValidationMessageFor(model => model.Question1)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Answer, "Svar við fyrirspurn")
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Answer)
            @Html.ValidationMessageFor(model => model.Answer)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email, "Tölvupóstfang")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Telephone, "Sími")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Telephone)
            @Html.ValidationMessageFor(model => model.Telephone)
        </div>
               
        <div class="editor-label">
            @Html.HiddenFor(model => model.QuestionDate, "Dagur")
        </div>
        <div class="editor-field">
            @Html.HiddenFor(model => model.QuestionDate)
            @Html.ValidationMessageFor(model => model.QuestionDate)
        </div>
        
        <div class="editor-label">
             @Html.LabelFor(model => model.Status, "Vista/Senda")
        </div>

        <div class="editor-field">
            <select id="Status" name="Status">
                <option selected="selected" value="Í vinnslu">Í Vinnslu</option>
                <option value="Senda">Senda</option>
            </select>     
        </div>
        
        @Html.HiddenFor(model => model.Title )
        @Html.HiddenFor(model => model.Question1 )

        <p>
            <input type="submit" value="Halda áfram" />
            
        </p>

        <div>
        @Html.ActionLink("Til baka í fyrirspurnir", "Index")</div>

    </fieldset>
}

